<h1 align = 'center'>REPORT PROBLEM</h1>
<form action = "<?=$base_url ?>pfmis/problem/addproblem" method = 'POST'>
    <table align = 'center'>
        <tr>
            <th align = 'right'>Room:</th>
            <td>
                <select name = 'room'>
                    <?php
                        $this->load->database();
                        $facilityListQ = 'SELECT DISTINCT RoomAssigned FROM pf_facilities GROUP BY RoomAssigned';
                        $facilityListR = $this->db->query($facilityListQ);
                        if($facilityListR->num_rows() > 0)
                        {
                            foreach($facilityListR->result() as $facilityList)
                            {
                                echo '<option>'.$facilityList->RoomAssigned.'</option>';
                            }
                        }
                        else
                        {
                            echo '<option>NO FACILITIES TO BE REPORTED</option>';
                        }
                    ?>
                </select>
            </td>
        </tr>
        <tr>
            <td align = "center" colspan = "2"><input type = "submit" value = "Next"></td>
        </tr>
    </table>
</form>